package cz.cuni.mff.d3s.arcas.generator.alloy;

import org.eclipse.xtext.ISetup;

import com.google.inject.Guice;
import com.google.inject.Injector;

/**
 * Initialization support for running Xtext languages
 * without equinox extension registry
 */
public class Setup implements ISetup {

	public static void doSetup() {
		new Setup().createInjectorAndDoEMFRegistration();
	}

	public Injector createInjectorAndDoEMFRegistration() {
		Injector injector = createInjector();
		return injector;
	}

	public Injector createInjector() {
		return Guice.createInjector(new AlloyGeneratorModule());
	}

}
